package org.jfonia.musicxml.model;

import java.util.ArrayList;
import java.util.Set;
import java.util.TreeSet;

import org.w3c.dom.Node;

public class Part extends Element
{
	private String				id			= null;

	private ArrayList<Measure>	measureList	= new ArrayList<Measure>();

	private int                 divisions = 1;

	private Set<Integer>		lyricsNumbers = new TreeSet<Integer>();	

	private PartContext			partContext	= null;	// volatile

	public Part(Node node)
	{
		super(node);
	}
	
	
	public void setId(String id)
	{
		this.id = id;
	}

	public String getId()
	{
		return id;
	}

	public void setMeasureList(ArrayList<Measure> measureList)
	{
		this.measureList = measureList;
	}

	public ArrayList<Measure> getMeasureList()
	{
		return measureList;
	}
	
	public void addMeasure(Measure m) 
	{
		this.measureList.add(m);
	}

	public void setPartContext(PartContext partContext)
	{
		this.partContext = partContext;
	}

	public PartContext getPartContext()
	{
		return partContext;
	}

	public int getDivisions()
	{
		return divisions;
	}

	public void setDivisions(int divisions)
	{
		this.divisions = divisions;
	}

	public Set<Integer> getLyricsNumbers()
	{
		return lyricsNumbers;
	}


	public void setLyricsNumbers(Set<Integer> lyricsNumbers)
	{
		this.lyricsNumbers = lyricsNumbers;
	}
}
